The present invention relates to, but is not limited to, a method and apparatus for reconstructing media, and more particularly to a method and a media receiver operative at an Internet multimedia device for reconstructing data packets, which comprises media information.
Internet Protocol (IP) telephony art includes a plurality of computer programs and applications which enable users to transmit and receive multimedia information such as audio, video and text over the Internet. Those applications known in the art as multimedia transceivers. An example for such an application, is an application for performing telephone calls over the Internet, for example, INTERNET PHONE(copyright) from VocalTec(copyright) communications of Herzelia, Israel.
A short description of a method of performing telephone calls over the Internet will be given now. A first user dial through a computer keyboards the number of a second user. The application, e.g. INTERNET PHONE(copyright), transfers the dial signals to a public telephony switching center for initiating the call. After establishing the call between users, the application digitally samples the voice of the first user, temporary stores the samples in a buffer, packages the samples into packets and transmits the packets using IP protocol to the second user. The application of the second user, e.g. INTERNET PHONE(copyright), receives the packets, strips the protocol headers from each packet to provide compress voice data samples, and converts the samples into voice. The method for transferring voice over the Internet which was described above, is done at both sides.
However, when transmitting media streams which include, for example, packets of audio and/or video, over the Internet, the packets may arrive in different time and order from which they have been transmitted. A special parameter is provided in each transmitted packet for reconstructing the packets of the stream at a receiver.
One example for the above mentioned special parameter, is a sequence number which is added to each packet and used to help the receiver to reconstruct the packets order. Another example is to add a timestamp to each packet which reflects the sampling instant of the first byte in the packet and used to reconstruct the media stream in the receiver in accordance with the time of sampling.
The disadvantage of using the timestamp parameter is that the data packet length is increased, thus a bit rate which is required for transmitting media over the network is increased.
There is a need for a method and apparatus for transmitting data packets, which mitigates the above disadvantage.
In a first aspect of the present invention there is provided a method for reconstructing media at a receiver from a media stream. The media stream includes a plurality of packets wherein each packet includes at least one media field. The method includes the steps of: monitoring said media stream, studying a packet pattern of the media stream, and estimating at least one media parameter of at least one lost packet for reconstructing media lost information at said receiver.
Advantageously, the method reconstructed media of media stream with changing packet size without using an information of media timestamp which is provided in each packet. Thus, the timestamp parameter may be estimated at the receiver and may not be transmitted with every packet. This reduces the required bandwidth for transmitting media over the network.
In the preferred embodiment of the invention, the step of estimating further includes the steps of: identifying at least one type of media pattern, and employing a method for estimating at least one media parameter in accordance with said type of media pattern.
In this manner, said media parameter is a media length which is the sum of media frames length of said packet of said media stream.
In this manner, said media pattern is a media length pattern of the media stream.
In this manner, said media pattern is virtually a fixed pattern and/or variable pattern.
In the preferred embodiment of the present invention, the method for reconstructing media includes the steps of: providing a sequence number to each packet of said stream, estimating said media length in accordance with the stream pattern, subtracting a sequence number of the previously received packet from a sequence number of a successive packet for calculating the number of packets which have been lost and reconstructing the media in accordance with the number of packets lost.
In yet another preferred embodiment of the invention, the method for reconstructing media includes the steps of estimating said media length in accordance with a first virtually fixed pattern for providing a first estimated media length, estimating said media length in accordance with a second virtually fixed pattern for providing a second estimated media length, and selecting a media length of the maximum value between said estimated media length, for reconstructing the media information of at least one lost packet.
In a second aspect of the invention there is provided an apparatus for reconstructing media at a receiver from a media stream. The media stream includes a plurality of data packets wherein each data packet includes at least one media field. The apparatus includes a monitor device for monitoring said media stream, a processing device for studying packet pattern of the media stream and for estimating a media length of at least one lost packet, and a reconstructing device for reconstructing media information at said receiver.
In this manner, the processing device further includes an identifier for identifying at least one type of packets pattern and an estimator for estimating said media length in accordance with said type of packets pattern.
In the preferred embodiment of the invention, the processing device employing at least two method for reconstructing media with accordance to said stream pattern.
In this manner, the first method includes the steps of: providing a sequence number to each packet of said stream, estimating said media length in accordance with the stream pattern, subtracting a sequence number of the previously received packet from a sequence number of a successive packet for calculating the number of packets which have been lost, and reconstructing the media information in accordance with the number of packets lost.
In this preferred embodiment of the invention, a second method for reconstructing media includes the steps of: estimating said media length in accordance with a first type of stream pattern for providing a first estimated media length; estimating said media time with accordance to a second type of stream pattern for providing a second estimated media length and selecting a media length of the maximum value between said estimated media length for reconstructing the media information of at least one lost packet.
Preferably, the reconstructing device interpolates a first media frame information with a second media frame information for providing interpolated media information of the length of lost media. This reconstructed media is inserted at the place of said lost media.
The preferred embodiments will be described now by way of example only and with reference to the drawing.